export function throttle(fn: (...args: any[]) => any, dealy: number) {
  let last = new Date().getTime();
  return function (this: any, ...args: any[]) {
    let now = Date.now();
    if (now - last >= dealy) {
      fn.apply(this, args);
      last = now;
    }
  };
}
